package service.impl;


import bean.ProductType;
import bean.User;
import dao.IProductTypeDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.IProductTypeService;


import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class ProductTypeServiceImpl  implements IProductTypeService {

        @Resource
        private IProductTypeDao iProductTypeDao;

        @Override
        public List<ProductType> queryAll() {
            return iProductTypeDao.queryAll();
        }

        @Override
        public ProductType queryById(Integer t_id) {
            return iProductTypeDao.queryById(t_id);
        }

        @Override
        public void add(ProductType productType) {
            iProductTypeDao.add(productType);
        }

        @Override
        public void update(ProductType productType) {

            iProductTypeDao.update(productType);
        }

        @Override
        public void delete(ProductType productType) {
            iProductTypeDao.delete(productType);
        }
    }


